{extend name="base" /}
{block name="body"}
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class=""><a href="{:url('admin/order/index')}">订单管理</a></li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form class="layui-form form-container" action="{:url('admin/order/send')}" method="post">
                    <div class="layui-form-item">
                        <label class="layui-form-label">订单编号</label>
                        <div class="layui-input-block">
                            <input type="text" name="" value="{$order.order_number}" readonly class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">订单状态</label>
                        <div class="layui-input-block">
                            <input type="text" name="" value="{$order.status_name}" class="layui-input" readonly>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">下单用户</label>
                        <div class="layui-input-block">
                            <input type="text" name="" value="{$order.username} (注册手机号：{$order.mobile})" class="layui-input" readonly>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">商品名称</label>
                        <div class="layui-input-block">
                            <input type="text" name="" value="{$order.name}" class="layui-input" readonly>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">商品图片</label>
                        <div class="layui-input-block">
                            <a href="{$img_url}{$order.image}" target="_blank">
                                <img src="{$img_url}{$order.image}" width="200px" height="200px">
                            </a>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">商品数量</label>
                        <div class="layui-input-block">
                            <input type="text" name="" value="{$order.number}" class="layui-input" readonly>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">客户备注</label>
                        <div class="layui-input-block">
                            <textarea name="" class="layui-textarea" readonly>{$order.remarks}</textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">收货人</label>
                        <div class="layui-input-block">
                            <input type="text" name="" value="{$order.contacts}" class="layui-input" readonly>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">收货人手机号</label>
                        <div class="layui-input-block">
                            <input type="text" name="" value="{$order.mobile}" class="layui-input" readonly>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">收货地址</label>
                        <div class="layui-input-block">
                            <textarea name="" class="layui-textarea" readonly>{$order.address}</textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">支付方式</label>
                        <div class="layui-input-block">
                            <input type="text" name="" value="{$order.pay_type}" class="layui-input" readonly>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">支付金额</label>
                        <div class="layui-input-block">
                            <input type="text" name="" value="{$order.pay_money}" class="layui-input" readonly>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">支付状态</label>
                        <div class="layui-input-block">
                            <input type="text" name="" value="{$order.pay_status}" class="layui-input" readonly>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">支付时间</label>
                        <div class="layui-input-block">
                            <input type="text" name="" value="{$order.pay_time}" class="layui-input" readonly>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">支付时间</label>
                        <div class="layui-input-block">
                            <input type="text" name="" value="{$order.add_time}" class="layui-input" readonly>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">快递公司</label>
                        <div class="layui-input-block">
                            <select name="express_id" lay-verify="required" {if condition="$order.status neq 1"} disabled="disabled" {/if}>
                                {foreach name="express" item="vo"}
                                <option value="{$vo.id}" {if condition="$vo.id==$order.express_id"}selected="selected"{/if}>{$vo.name}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">快递单号</label>
                        <div class="layui-input-block">
                            <input type="text" name="express_number" value="{$order.express_number|default=''}"class="layui-input" {if condition="$order.status eq 1"} required lay-verify="required" placeholder="请输入快递单号" {else/}readonly{/if}>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="hidden" name="id" value="{$order.id}">
                            {if condition="$order.status eq 1"}
                                <button class="layui-btn" lay-submit lay-filter="*">发货</button>
                            {/if}
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="js"}
<script src="__JS__/ueditor/ueditor.config.js"></script>
<script src="__JS__/ueditor/ueditor.all.min.js"></script>
{/block}
{block name="script"}
<script>
    var ue = UE.getEditor('content');
</script>
{/block}